define(
   [
      'dojo/_base/declare',
      'dojo/_base/lang'
   ],
   function(declare, lang)
   {
      return declare([],
      {
         mIdPropName: "Id",
         constructor: function(args)
         {
            dojo.safeMixin(this, args);
         },
         postscript: function(args)
         {
            this.inherited(arguments);
         },
         fetchItemOnGridById: function(id)
         {
            for (var i=0, il = this.rowCount; i < il; i++)
            {
               var gridItem = this.getItem(i);
               if(gridItem && gridItem[this.mIdPropName] === id)
               {
                  return gridItem;
               }
            }
            return null;
         },
         setValuesFromObjectToItem: function(obj, item)
         {
            for(prop in obj)
            {
               if(item[prop] == undefined || prop == this.mIdPropName)
                  continue;
               this.store.setValue(item, prop, obj[prop]);
            }
         }
      });
   }
);
